<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.9/vue.js"></script>
</head>

<body>
    <div id="app">
        <img style="width:600px" :src="imgUrl" alt="">
        <button @click="changeOne">点击切换图片</button>
    </div>
    <script>
        new Vue({
            el: '#app',
            data: {
                imgUrl: './v-text&v-html.png'
            },
            methods: {
                changeOne() {
                    if (this.imgUrl === './v-text&v-html.png') {
                        this.imgUrl = 'https://ts1.cn.mm.bing.net/th/id/R-C.66d7b796377883a92aad65b283ef1f84?rik=sQ%2fKoYAcr%2bOwsw&riu=http%3a%2f%2fwww.quazero.com%2fuploads%2fallimg%2f140305%2f1-140305131415.jpg&ehk=Hxl%2fQ9pbEiuuybrGWTEPJOhvrFK9C3vyCcWicooXfNE%3d&risl=&pid=ImgRaw&r=0'
                    } else {
                        this.imgUrl = './v-text&v-html.png';
                    }
                },

            }
        })
    </script>
</body>

</html>